using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class SnsDownloadRequest : GeneratedMessageLite<SnsDownloadRequest, SnsDownloadRequest.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<SnsDownloadRequest, SnsDownloadRequest.Builder>
		{
			private bool resultIsReadOnly;
			private SnsDownloadRequest result;
			protected override SnsDownloadRequest.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override SnsDownloadRequest MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override SnsDownloadRequest DefaultInstanceForType
			{
				get
				{
					return SnsDownloadRequest.DefaultInstance;
				}
			}
			public BaseRequest BaseRequest
			{
				get
				{
					return this.result.BaseRequest;
				}
				set
				{
					this.SetBaseRequest(value);
				}
			}
			public int StartPos
			{
				get
				{
					return this.result.StartPos;
				}
				set
				{
					this.SetStartPos(value);
				}
			}
			public int TotalLen
			{
				get
				{
					return this.result.TotalLen;
				}
				set
				{
					this.SetTotalLen(value);
				}
			}
			public string BufferId
			{
				get
				{
					return this.result.BufferId;
				}
				set
				{
					this.SetBufferId(value);
				}
			}
			public uint Type
			{
				get
				{
					return this.result.Type;
				}
				set
				{
					this.SetType(value);
				}
			}
			public uint DownBufLen
			{
				get
				{
					return this.result.DownBufLen;
				}
				set
				{
					this.SetDownBufLen(value);
				}
			}
			public Builder()
			{
				this.result = SnsDownloadRequest.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(SnsDownloadRequest cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private SnsDownloadRequest PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					SnsDownloadRequest other = this.result;
					this.result = new SnsDownloadRequest();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override SnsDownloadRequest.Builder Clear()
			{
				this.result = SnsDownloadRequest.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override SnsDownloadRequest.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new SnsDownloadRequest.Builder(this.result);
				}
				return new SnsDownloadRequest.Builder().MergeFrom(this.result);
			}
			public override SnsDownloadRequest BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override SnsDownloadRequest.Builder MergeFrom(IMessageLite other)
			{
				if (other is SnsDownloadRequest)
				{
					return this.MergeFrom((SnsDownloadRequest)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override SnsDownloadRequest.Builder MergeFrom(SnsDownloadRequest other)
			{
				return this;
			}
			public override SnsDownloadRequest.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override SnsDownloadRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(SnsDownloadRequest._snsDownloadRequestFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = SnsDownloadRequest._snsDownloadRequestFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 16u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseRequest.Builder builder = BaseRequest.CreateBuilder();
							if (this.result.hasBaseRequest)
							{
								builder.MergeFrom(this.BaseRequest);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseRequest = builder.BuildPartial();
							continue;
						}
						if (num3 == 16u)
						{
							this.result.hasStartPos = input.ReadInt32(ref this.result.startPos_);
							continue;
						}
					}
					else
					{
						if (num3 <= 34u)
						{
							if (num3 == 24u)
							{
								this.result.hasTotalLen = input.ReadInt32(ref this.result.totalLen_);
								continue;
							}
							if (num3 == 34u)
							{
								this.result.hasBufferId = input.ReadString(ref this.result.bufferId_);
								continue;
							}
						}
						else
						{
							if (num3 == 40u)
							{
								this.result.hasType = input.ReadUInt32(ref this.result.type_);
								continue;
							}
							if (num3 == 48u)
							{
								this.result.hasDownBufLen = input.ReadUInt32(ref this.result.downBufLen_);
								continue;
							}
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public SnsDownloadRequest.Builder SetBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = value;
				return this;
			}
			public SnsDownloadRequest.Builder SetBaseRequest(BaseRequest.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = builderForValue.Build();
				return this;
			}
			public SnsDownloadRequest.Builder MergeBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseRequest && this.result.baseRequest_ != BaseRequest.DefaultInstance)
				{
					this.result.baseRequest_ = BaseRequest.CreateBuilder(this.result.baseRequest_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseRequest_ = value;
				}
				this.result.hasBaseRequest = true;
				return this;
			}
			public SnsDownloadRequest.Builder ClearBaseRequest()
			{
				this.PrepareBuilder();
				this.result.hasBaseRequest = false;
				this.result.baseRequest_ = null;
				return this;
			}
			public SnsDownloadRequest.Builder SetStartPos(int value)
			{
				this.PrepareBuilder();
				this.result.hasStartPos = true;
				this.result.startPos_ = value;
				return this;
			}
			public SnsDownloadRequest.Builder ClearStartPos()
			{
				this.PrepareBuilder();
				this.result.hasStartPos = false;
				this.result.startPos_ = 0;
				return this;
			}
			public SnsDownloadRequest.Builder SetTotalLen(int value)
			{
				this.PrepareBuilder();
				this.result.hasTotalLen = true;
				this.result.totalLen_ = value;
				return this;
			}
			public SnsDownloadRequest.Builder ClearTotalLen()
			{
				this.PrepareBuilder();
				this.result.hasTotalLen = false;
				this.result.totalLen_ = 0;
				return this;
			}
			public SnsDownloadRequest.Builder SetBufferId(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBufferId = true;
				this.result.bufferId_ = value;
				return this;
			}
			public SnsDownloadRequest.Builder ClearBufferId()
			{
				this.PrepareBuilder();
				this.result.hasBufferId = false;
				this.result.bufferId_ = "";
				return this;
			}
			public SnsDownloadRequest.Builder SetType(uint value)
			{
				this.PrepareBuilder();
				this.result.hasType = true;
				this.result.type_ = value;
				return this;
			}
			public SnsDownloadRequest.Builder ClearType()
			{
				this.PrepareBuilder();
				this.result.hasType = false;
				this.result.type_ = 0u;
				return this;
			}
			public SnsDownloadRequest.Builder SetDownBufLen(uint value)
			{
				this.PrepareBuilder();
				this.result.hasDownBufLen = true;
				this.result.downBufLen_ = value;
				return this;
			}
			public SnsDownloadRequest.Builder ClearDownBufLen()
			{
				this.PrepareBuilder();
				this.result.hasDownBufLen = false;
				this.result.downBufLen_ = 0u;
				return this;
			}
		}
		public const int BaseRequestFieldNumber = 1;
		public const int StartPosFieldNumber = 2;
		public const int TotalLenFieldNumber = 3;
		public const int BufferIdFieldNumber = 4;
		public const int TypeFieldNumber = 5;
		public const int DownBufLenFieldNumber = 6;
		private static readonly SnsDownloadRequest defaultInstance;
		private static readonly string[] _snsDownloadRequestFieldNames;
		private static readonly uint[] _snsDownloadRequestFieldTags;
		private bool hasBaseRequest;
		private BaseRequest baseRequest_;
		private bool hasStartPos;
		private int startPos_;
		private bool hasTotalLen;
		private int totalLen_;
		private bool hasBufferId;
		private string bufferId_ = "";
		private bool hasType;
		private uint type_;
		private bool hasDownBufLen;
		private uint downBufLen_;
		private int memoizedSerializedSize = -1;
		public static SnsDownloadRequest DefaultInstance
		{
			get
			{
				return SnsDownloadRequest.defaultInstance;
			}
		}
		public override SnsDownloadRequest DefaultInstanceForType
		{
			get
			{
				return SnsDownloadRequest.DefaultInstance;
			}
		}
		protected override SnsDownloadRequest ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseRequest BaseRequest
		{
			get
			{
				return this.baseRequest_ ?? BaseRequest.DefaultInstance;
			}
		}
		public int StartPos
		{
			get
			{
				return this.startPos_;
			}
		}
		public int TotalLen
		{
			get
			{
				return this.totalLen_;
			}
		}
		public string BufferId
		{
			get
			{
				return this.bufferId_;
			}
		}
		public uint Type
		{
			get
			{
				return this.type_;
			}
		}
		public uint DownBufLen
		{
			get
			{
				return this.downBufLen_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseRequest && this.hasStartPos && this.hasType && this.hasDownBufLen && this.BaseRequest.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseRequest)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseRequest);
				}
				if (this.hasStartPos)
				{
					num += CodedOutputStream.ComputeInt32Size(2, this.StartPos);
				}
				if (this.hasTotalLen)
				{
					num += CodedOutputStream.ComputeInt32Size(3, this.TotalLen);
				}
				if (this.hasBufferId)
				{
					num += CodedOutputStream.ComputeStringSize(4, this.BufferId);
				}
				if (this.hasType)
				{
					num += CodedOutputStream.ComputeUInt32Size(5, this.Type);
				}
				if (this.hasDownBufLen)
				{
					num += CodedOutputStream.ComputeUInt32Size(6, this.DownBufLen);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private SnsDownloadRequest()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] snsDownloadRequestFieldNames = SnsDownloadRequest._snsDownloadRequestFieldNames;
			if (this.hasBaseRequest)
			{
				output.WriteMessage(1, snsDownloadRequestFieldNames[0], this.BaseRequest);
			}
			if (this.hasStartPos)
			{
				output.WriteInt32(2, snsDownloadRequestFieldNames[3], this.StartPos);
			}
			if (this.hasTotalLen)
			{
				output.WriteInt32(3, snsDownloadRequestFieldNames[4], this.TotalLen);
			}
			if (this.hasBufferId)
			{
				output.WriteString(4, snsDownloadRequestFieldNames[1], this.BufferId);
			}
			if (this.hasType)
			{
				output.WriteUInt32(5, snsDownloadRequestFieldNames[5], this.Type);
			}
			if (this.hasDownBufLen)
			{
				output.WriteUInt32(6, snsDownloadRequestFieldNames[2], this.DownBufLen);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseRequest)
			{
				num ^= this.baseRequest_.GetHashCode();
			}
			if (this.hasStartPos)
			{
				num ^= this.startPos_.GetHashCode();
			}
			if (this.hasTotalLen)
			{
				num ^= this.totalLen_.GetHashCode();
			}
			if (this.hasBufferId)
			{
				num ^= this.bufferId_.GetHashCode();
			}
			if (this.hasType)
			{
				num ^= this.type_.GetHashCode();
			}
			if (this.hasDownBufLen)
			{
				num ^= this.downBufLen_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			SnsDownloadRequest snsDownloadRequest = value as SnsDownloadRequest;
			return snsDownloadRequest != null && (this.hasBaseRequest == snsDownloadRequest.hasBaseRequest && (!this.hasBaseRequest || this.baseRequest_.Equals(snsDownloadRequest.baseRequest_))) && (this.hasStartPos == snsDownloadRequest.hasStartPos && (!this.hasStartPos || this.startPos_.Equals(snsDownloadRequest.startPos_))) && (this.hasTotalLen == snsDownloadRequest.hasTotalLen && (!this.hasTotalLen || this.totalLen_.Equals(snsDownloadRequest.totalLen_))) && (this.hasBufferId == snsDownloadRequest.hasBufferId && (!this.hasBufferId || this.bufferId_.Equals(snsDownloadRequest.bufferId_))) && (this.hasType == snsDownloadRequest.hasType && (!this.hasType || this.type_.Equals(snsDownloadRequest.type_))) && (this.hasDownBufLen == snsDownloadRequest.hasDownBufLen && (!this.hasDownBufLen || this.downBufLen_.Equals(snsDownloadRequest.downBufLen_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<SnsDownloadRequest, SnsDownloadRequest.Builder>.PrintField("BaseRequest", this.hasBaseRequest, this.baseRequest_, writer);
			GeneratedMessageLite<SnsDownloadRequest, SnsDownloadRequest.Builder>.PrintField("StartPos", this.hasStartPos, this.startPos_, writer);
			GeneratedMessageLite<SnsDownloadRequest, SnsDownloadRequest.Builder>.PrintField("TotalLen", this.hasTotalLen, this.totalLen_, writer);
			GeneratedMessageLite<SnsDownloadRequest, SnsDownloadRequest.Builder>.PrintField("BufferId", this.hasBufferId, this.bufferId_, writer);
			GeneratedMessageLite<SnsDownloadRequest, SnsDownloadRequest.Builder>.PrintField("Type", this.hasType, this.type_, writer);
			GeneratedMessageLite<SnsDownloadRequest, SnsDownloadRequest.Builder>.PrintField("DownBufLen", this.hasDownBufLen, this.downBufLen_, writer);
		}
		public static SnsDownloadRequest ParseFrom(byte[] data)
		{
			return SnsDownloadRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private SnsDownloadRequest MakeReadOnly()
		{
			return this;
		}
		public static SnsDownloadRequest.Builder CreateBuilder()
		{
			return new SnsDownloadRequest.Builder();
		}
		public override SnsDownloadRequest.Builder ToBuilder()
		{
			return SnsDownloadRequest.CreateBuilder(this);
		}
		public override SnsDownloadRequest.Builder CreateBuilderForType()
		{
			return new SnsDownloadRequest.Builder();
		}
		public static SnsDownloadRequest.Builder CreateBuilder(SnsDownloadRequest prototype)
		{
			return new SnsDownloadRequest.Builder(prototype);
		}
		static SnsDownloadRequest()
		{
			SnsDownloadRequest.defaultInstance = new SnsDownloadRequest().MakeReadOnly();
			SnsDownloadRequest._snsDownloadRequestFieldNames = new string[]
			{
				"BaseRequest",
				"BufferId",
				"DownBufLen",
				"StartPos",
				"TotalLen",
				"Type"
			};
			SnsDownloadRequest._snsDownloadRequestFieldTags = new uint[]
			{
				10u,
				34u,
				48u,
				16u,
				24u,
				40u
			};
			object.ReferenceEquals(micromsg.Proto.SnsDownloadRequest.Descriptor, null);
		}
	}
}
